package com.jekun.helloworld.designmode.proxy.book;

/**
 * @Author Joey
 * @Date 2022/5/19 20:03
 * @Description
 */
public class Proxy implements GiveGift {

    Pursuit gg;

    public Proxy(SchoolGirls mm) {
        this.gg = new Pursuit(mm);
    }

    /**
     * 送玩具
     */
    @Override
    public void giveDolls() {
        System.out.println("我是代理，替卓贾谊");
        gg.giveDolls();
        System.out.println("洋娃娃送完了");
    }

    /**
     * 送花
     */
    @Override
    public void giveFlowers() {
        System.out.println("我是代理，替卓贾谊");
        gg.giveFlowers();
        System.out.println("花花送完了");
    }
}
